package com.mx.pojo.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.mx.pojo.User;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author MinXu
 * @since 2021/7/28
 * QQ   754647431
 */
@AllArgsConstructor
@NoArgsConstructor
@Data
public class UserVO {
    private static final long serialVersionUID = 1L;

    public UserVO(User user) {
        this.id = user.getId();
        this.name = user.getName();
        this.avatar = user.getAvatar();
        this.mail = user.getMail();
        this.introduction = user.getIntroduction();
    }

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 用户名称
     */
    private String name;

    /**
     * 用户头像
     */
    private String avatar;

    private String mail;

    private String introduction;
}
